<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding:0;
        }
        .box {
            width: 50px;
            /* height: 300px; */
            background-color: pink;
            margin: 100px auto;
            text-align: center;
        }
        .wb {
            height: 30px;
            line-height: 30px;
            
        }
        .wb:hover {
            background-color: #ccc;
        }
        ul {
            display: none;
        }
        ul li {
            list-style: none;
            width: 50px;
            height: 30px;
            border-bottom: 1px solid orange;
           
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="wb">微博</div>
        <ul class="pl">
            <li>私信</li>
            <li>评论</li>
            <li>@我</li>
        </ul>
    </div>
    <script>
        var wb = document.querySelector('.wb');
        var pl = document.querySelector('.pl');
        wb.onmouseover = function() {
            pl.style.display = 'block';
        }
        wb.onmouseout = function() {
            pl.style.display = 'none';
        }
    </script>
</body>
</html>